*Replication Code for “Leadership Experience, Cosponsor Cues and the Floor Agenda in State Legislatures”
*Todd Makse
*July 2024

*Descriptive statistics on leadership change across states (use Leader Change by State.dta)
sum chg_lower chg_upper
correl chg_lower chg_upper
tab chamber_diff
correl chg_both turnover
tabstat chg_both, by(termlim)
pwcorr chg_both squire, sig
pwcorr chg_both squire if termlim==0, sig
tabstat chg_both, by(culture)
reg chg_both turnover termlim
tabstat prom_ldr prom_ch prom_oth, stats(sum)
tabstat prom_ldr prom_ch prom_oth if termlim==1, stats(sum)
*Creation of Map 1
maptile chg_both, geo(state) cutvalues(0.25 0.5 0.75)

*Figure 1
*Find differences between bills with high and low values of each cue type, by leader type (use main replication dataset)
bysort newlead_d: ttest floor if quantity!=0, by(quantity)
bysort newleader: ttest floor if quantity!=0, by(quantity)
bysort newlead_d: ttest floor if diversity!=0, by(diversity)
bysort newleader: ttest floor if diversity!=0, by(diversity)
bysort newlead_d: ttest floor if quality!=0, by(quality)
bysort newleader: ttest floor if quality!=0, by(quality)
*Use separate file to create figure (Use of Cues by Leader Type.dta)
graph hbar quantity diversity quality, over(lead, sort(order))
gr_edit .scaleaxis.style.editstyle majorstyle(use_labels(yes)) editcopy
gr_edit .scaleaxis.style.editstyle majorstyle(alternate(no)) editcopy
gr_edit .plotregion1.GraphEdit, cmd(_set_barlabel_method bar)
gr_edit .plotregion1.bars[15].style.editstyle shadestyle(color(gs14)) editcopy
gr_edit .plotregion1.bars[15].style.editstyle linestyle(color(gs14)) editcopy
gr_edit .plotregion1.bars[14].style.editstyle shadestyle(color(gs3)) editcopy
gr_edit .plotregion1.bars[14].style.editstyle linestyle(color(gs3)) editcopy
gr_edit .plotregion1.bars[13].style.editstyle shadestyle(color(gs8)) editcopy
gr_edit .plotregion1.bars[13].style.editstyle linestyle(color(gs8)) editcopy
gr_edit .style.editstyle boxstyle(shadestyle(color(white))) editcopy
gr_edit .style.editstyle boxstyle(linestyle(color(white))) editcopy
gr_edit .legend.plotregion1.label[1].style.editstyle size(small) editcopy
gr_edit .legend.plotregion1.label[2].style.editstyle size(small) editcopy
gr_edit .legend.plotregion1.label[3].style.editstyle size(small) editcopy
gr_edit .legend.plotregion1.key[1].ysz.editstyle 2.5 editcopy
gr_edit .legend.plotregion1.key[2].ysz.editstyle 2.5 editcopy
gr_edit .legend.plotregion1.key[3].ysz.editstyle 2.5 editcopy
gr_edit .legend.Edit , style(cols(3)) style(rows(0)) keepstyles 
gr_edit .legend.plotregion1.label[1].text = {}
gr_edit .legend.plotregion1.label[1].text.Arrpush Quantity
gr_edit .legend.plotregion1.label[2].text = {}
gr_edit .legend.plotregion1.label[2].text.Arrpush Diversity
gr_edit .legend.plotregion1.label[3].text = {}
gr_edit .legend.plotregion1.label[3].text.Arrpush Quality
gr_edit .scaleaxis.title.text = {}
gr_edit .scaleaxis.title.text.Arrpush Difference in Floor Consideration Rate
gr_edit .scaleaxis.title.style.editstyle margin(small) editcopy

*Findings described in prose in data and methods section (use main replication dataset) 
ttest floor, by(no_cosp)
tabstat floor, by(statenum)
correl spon_samech_pct spon_sd cosp_qual_pct

*Table 2: Summary statistics 
sum floor newlead_d spon_samech_pct spon_sd cosp_qual_pct auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover maj_size introlim approps

*Tests for the value of random slope terms for cues index
melogit floor if cues_ct!=. || st_session:
est store cues1	
melogit floor || st_session: cues_ct
est store cues2
lrtest cues1 cues2

*Models with index of cosponsor cues 
*Main model with full sample of 26 states (Table 3, column 1)
melogit floor c.newlead_d##c.cues_ct auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.cues_ct introlim || st_session: cues_ct
margins,  at(cues_ct=(-3 3) newlead=(0 1))
*Alternative model with full sample but also including bills with no cosponsors (Table 3, column 2)
melogit floor c.newlead_d##c.cues_ct2 no_cosp auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.cues_ct2 introlim || st_session: cues_ct2
*Subsample of 8 states only (Table 3, column 3)
melogit floor c.newlead_d##c.cues_ct auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.cues_ct introlim if cosp_intro==1 || st_session: cues_ct

*Models with one of the three cues (continuous version) with others as controls
*Effects of quantity, controlling for diversity and quality (Table 4, Column 1)
melogit floor c.newlead_d##c.spon_samech_pct spon_sd cosp_qual_pct auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.spon_samech_pct introlim || st_session: spon_samech_pct
*Effects of diversity, controlling for quantity and quality (Table 4, Column 2)
melogit floor c.newlead_d##c.spon_sd spon_samech_pct cosp_qual_pct auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.spon_sd introlim  || st_session: spon_sd
*Effects of quality, controlling for quantity and diversity  (Table 4, Column 3)
melogit floor c.newlead_d##c.cosp_qual_pct spon_samech_pct spon_sd auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.cosp_qual_pct introlim  || st_session: cosp_qual_pct

*Models with polychotomous measure of leader change (Table 5, Column 1)   
melogit floor i.newleader##c.cues_ct auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.cues_ct introlim || st_session: cues_ct
*Within-leader analyses (Table 5, Column 2)
melogit floor c.newlead_d##c.cues_ct auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.cues_ct introlim || leader_id: cues_ct
*Only reported bills (Table 5, Column 3)
melogit floor c.newlead_d##c.cues_ct auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.cues_ct introlim if reported==1 || st_session: cues_ct

*Additional robustness tests discussed in text 

*Models with leaders who served part of prior session not treated as new leaders (Footnote 9)
melogit floor c.newlead_alt##c.cues_ct auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.cues_ct introlim || st_session: cues_ct
melogit floor c.newlead_alt##c.spon_samech_pct spon_sd cosp_qual_pct auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.spon_samech_pct introlim || st_session: spon_samech_pct
melogit floor c.newlead_alt##c.spon_sd spon_samech_pct cosp_qual_pct auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.spon_sd introlim  || st_session: spon_sd
melogit floor c.newlead_alt##c.cosp_qual_pct spon_samech_pct spon_sd auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.cosp_qual_pct introlim  || st_session: cosp_qual_pct

*Models with ordinal measure of leadership experience (Footnote 10) 
*Models with index of cosponsor cues (as in Table 3, column 1)
melogit floor c.lead_terms##c.cues_ct auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.cues_ct introlim || st_session: cues_ct
*Effects of quantity, controlling for diversity and quality (as in Table 4, Column 1)
melogit floor c.lead_terms##c.spon_samech_pct spon_sd cosp_qual_pct auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.spon_samech_pct introlim || st_session: spon_samech_pct
*Effects of diversity, controlling for quantity and quality (as in Table 4, Column 2)
melogit floor c.lead_terms##c.spon_sd spon_samech_pct cosp_qual_pct auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.spon_sd introlim || st_session: spon_sd
*Effects of quality, controlling for quantity and diversity (as in Table 4, Column 3)
melogit floor c.lead_terms##c.cosp_qual_pct spon_samech_pct spon_sd auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.cosp_qual_pct introlim    || st_session: cosp_qual_pct

*Models accounting for cosponsorship limits (Footnote 14) 
melogit floor c.newlead_d##c.cues_ct auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.cues_ct introlim cosplim || st_session: cues_ct
melogit floor c.newlead_d##c.cues_ct auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.cues_ct introlim c.cosplim##c.cues_ct || st_session: cues_ct

*Models with 8, 12, 17, and 20 state subsamples (Footnote 16)
*8-state subsample
*Models with index of cosponsor cues (as in Table 3, column 1)
melogit floor c.newlead_d##c.cues_ct auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.cues_ct introlim if bw_rate==1 || st_session: cues_ct
*Effects of quantity, controlling for diversity and quality (as in Table 4, Column 1)
melogit floor c.newlead_d##c.spon_samech_pct spon_sd cosp_qual_pct auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.spon_samech_pct introlim if bw_rate==1  || st_session: spon_samech_pct
*Effects of diversity, controlling for quantity and quality (as in Table 4, Column 2)
melogit floor c.newlead_d##c.spon_sd spon_samech_pct cosp_qual_pct auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.spon_sd introlim if bw_rate==1  || st_session: spon_sd
*Effects of quality, controlling for quantity and diversity (as in Table 4, Column 3)
melogit floor c.newlead_d##c.cosp_qual_pct spon_samech_pct spon_sd auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.cosp_qual_pct introlim  if bw_rate==1   || st_session: cosp_qual_pct

*12-state subsample
*Models with index of cosponsor cues (as in Table 3, column 1)
melogit floor c.newlead_d##c.cues_ct auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.cues_ct introlim if bw_rate<=2 || st_session: cues_ct
*Effects of quantity, controlling for diversity and quality (as in Table 4, Column 1)
melogit floor c.newlead_d##c.spon_samech_pct spon_sd cosp_qual_pct auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.spon_samech_pct introlim if bw_rate<=2  || st_session: spon_samech_pct
*Effects of diversity, controlling for quantity and quality (as in Table 4, Column 2)
melogit floor c.newlead_d##c.spon_sd spon_samech_pct cosp_qual_pct auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.spon_sd introlim if bw_rate<=2  || st_session: spon_sd
*Effects of quality, controlling for quantity and diversity (as in Table 4, Column 3)
melogit floor c.newlead_d##c.cosp_qual_pct spon_samech_pct spon_sd auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.cosp_qual_pct introlim  if bw_rate<=2   || st_session: cosp_qual_pct

*17-state subsample
*Models with index of cosponsor cues (as in Table 3, column 1)
melogit floor c.newlead_d##c.cues_ct auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.cues_ct introlim if bw_rate<=3 || st_session: cues_ct
*Effects of quantity, controlling for diversity and quality (as in Table 4, Column 1)
melogit floor c.newlead_d##c.spon_samech_pct spon_sd cosp_qual_pct auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.spon_samech_pct introlim if bw_rate<=3  || st_session: spon_samech_pct
*Effects of diversity, controlling for quantity and quality (as in Table 4, Column 2)
melogit floor c.newlead_d##c.spon_sd spon_samech_pct cosp_qual_pct auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.spon_sd introlim if bw_rate<=3 || st_session: spon_sd
*Effects of quality, controlling for quantity and diversity (as in Table 4, Column 3)
melogit floor c.newlead_d##c.cosp_qual_pct spon_samech_pct spon_sd auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.cosp_qual_pct introlim if bw_rate<=3  || st_session: cosp_qual_pct

*20-state subsample
*Models with index of cosponsor cues (as in Table 3, column 1)
melogit floor c.newlead_d##c.cues_ct auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.cues_ct introlim if bw_rate<=4 || st_session: cues_ct
*Effects of quantity, controlling for diversity and quality (as in Table 4, Column 1)
melogit floor c.newlead_d##c.spon_samech_pct spon_sd cosp_qual_pct auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.spon_samech_pct introlim if bw_rate<=4 || st_session: spon_samech_pct
*Effects of diversity, controlling for quantity and quality (as in Table 4, Column 2)
melogit floor c.newlead_d##c.spon_sd spon_samech_pct cosp_qual_pct auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.spon_sd introlim if bw_rate<=4 || st_session: spon_sd
*Effects of quality, controlling for quantity and diversity (as in Table 4, Column 3)
melogit floor c.newlead_d##c.cosp_qual_pct spon_samech_pct spon_sd auth_maj auth_lead auth_chair auth_extreme auth_srty auth_female squire clucas anzia turnover c.maj_size##c.cosp_qual_pct introlim if bw_rate<=4  || st_session: cosp_qual_pct
